package cn.edu.nju.software.service.impl;

import java.sql.SQLException;

import cn.edu.nju.software.bean.storage.User;
import cn.edu.nju.software.dao.intf.UserDao;
import cn.edu.nju.software.service.intf.UserService;

public class UserServiceImpl implements UserService {

	private UserDao userDao;

	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	}

	@Override
	public User login(String signInName, String password) throws SQLException {
		return userDao.login(signInName, password);
	}

	@Override
	public int register(User user) throws SQLException {
		return userDao.registerUser(user);
	}
	
	@Override
	public void updateUser(User user) throws SQLException {
		userDao.updateUser(user);
	}

}
